# About.py
# Copyright (C) otacon 2010 <orfeo18@gmail.com>
# 
# AdSense-Monitor is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# 
# AdSense-Monitor is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License along
# with this program.  If not, see <http://www.gnu.org/licenses/>.

import os
from core import Path

try:
	import pygtk
	#pygtk.require("2.17.0")
except:
	print "pygtk not found"
	sys.exit(1)
try:
	import gtk
except:
	print "gtk or glade not found"
	sys.exit(1)

class About():

    def __init__(self):
        builder = os.path.join(Path.WORKING_PATH,'gui',"About.ui")
        self._ui = gtk.Builder()
        self._ui.add_from_file( builder )
        self._ui.connect_signals(self)
        self.about_dialog = self._ui.get_object('aboutdialog')

    def show(self):
        self.about_dialog.run()
        self.about_dialog.hide()
